#include <stdio.h>
#include <math.h>
#define PI 3.1415926535

int main(void) {
    double a, b, p;
    scanf("%lf%lf%lf", &a, &b, &p);
    printf("%g\n", sqrt(a * a + b * b - 2.0 * a * b * cos(p / 180 * PI)));
    return 0;
}
